<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<head>
<link href="./css/bootstrap.css" rel="stylesheet">
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

	<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
<style>
.table-container {
	margin-top: 10px;
	top: 20px;
	width: 600px;
	margin-left: 0px;
	margin-right: auto;
	top: 20px;
}

.back {
	top: 20px;
	left: 20px;
	position: fixed;
	width: 100px;
	height: 50px;
	width: 100px;
	position: fixed;
}
</style>

</head>
<body>
<%@ include file="header.jsp" %>
	<div class="table-container">
		<table class="table table-striped table-hover table-bordered">
			<thead>
				<tr>
					<td>订单号</td>
					<td>菜名</td>
					<td>数量</td>
					<td>时间</td>
					<td>操作</td>
				</tr>
			</thead>

			<c:forEach items="${orders}" var="m">
				<tr>
					<td>${m.getOrderId()}</td>
					<td>${m.getFoodName()}</td>
					<td>${m.getAmount()}</td>
					<td>${m.getOrderTime()}</td>
					<td><a href="${pageContext.request.contextPath}/OrderStatesServlet?id=${m.getOrderId()}"><button>减</button></a></td>

				</tr>
			</c:forEach>
			<button class="btn btn-primary" type="button">
				待做的餐品数量： <span class="badge">${ordernum}</span>
			</button><br/>
		</table>
		<h2>共： ${listTotalSum}&nbsp;元</h2>
	</div>

</body>
